/*
 * Copyright 2010 Christian Matzat and others
 *
 *    Licensed under the Apache License, Version 2.0 (the "License");
 *    you may not use this file except in compliance with the License.
 *    You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 *    Unless required by applicable law or agreed to in writing, software
 *    distributed under the License is distributed on an "AS IS" BASIS,
 *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *    See the License for the specific language governing permissions and
 *    limitations under the License.
 */

package android.util;

import org.apache.log4j.Logger;

/**
 * Mock-Class for Unit-Tests
 */
public class Log {

    public static final int VERBOSE = 2;
    public static final int DEBUG = 3;
    public static final int INFO = 4;
    public static final int WARN = 5;
    public static final int ERROR = 6;
    public static final int ASSERT = 7;

    public static boolean isLoggable(String tag, int level) {
        return true;
    }

    public static void v(String tag, String message) {
        getLogger(tag).debug(message);
    }

    public static void d(String tag, String message) {
        getLogger(tag).debug(message);
    }

    public static void i(String tag, String message) {
        getLogger(tag).info(message);
    }

    public static void w(String tag, String message) {
        getLogger(tag).warn(message);
    }

    public static void e(String tag, String message) {
        getLogger(tag).error(message);
    }

    public static void e(String tag, String message, Throwable ex) {
        getLogger(tag).error(message, ex);
    }

    private static Logger getLogger(String tag) {
        return Logger.getLogger(tag);
    }
}
